package com.tywj.buscustomerapp.view.item;

import android.support.annotation.NonNull;
import android.view.View;
import android.widget.TextView;

import com.tywj.buscustomerapp.R;
import com.tywj.buscustomerapp.model.bean.ProblemBean;
import com.tywj.buscustomerapp.utils.myadapter.item.AdapterItem;

public class ProblemItem implements AdapterItem<ProblemBean> {
    TextView questionText;
    TextView answerText;
    @Override
    public int getLayoutResId() {
        return R.layout.item_problem_layout;
    }

    @Override
    public void bindViews(@NonNull View root) {
        questionText = root.findViewById(R.id.question);
        answerText =  root.findViewById(R.id.answer);
    }

    @Override
    public void setViews() {

    }

    @Override
    public void handleData(ProblemBean problemBean, int position) {
        questionText.setText("问: "+ problemBean.getQuestion());
        answerText.setText("答： "+problemBean.getAnswer());
    }
}
